#include "String.h"

namespace yyp
{
	void string::reserve(size_t n)
	{
		if (n <= _size)
		{
			;
		}
		else if (n <= _capacity)
		{
			;
		}
		else
		{
			char* tmp = new char[n+1];
			memcpy(tmp, _str, _size*sizeof(char));
			delete _str;

			_str = tmp;
			_capacity = n+1;
		}
	}
}